<script setup lang="ts">
import {useQuestionStore} from "@/stores/question";

const questionStore = useQuestionStore();
</script>

<template>
  <div v-if="questionStore.currentQue" class="attribute-container p-16px">
    <el-form label-position="top">
      <el-form-item label="标题">
        <el-input v-model="questionStore.currentQue.title"></el-input>
      </el-form-item>
      <el-form-item label="占位符">
        <el-input v-model="questionStore.currentQue.title"></el-input>
      </el-form-item>
      <el-form-item label="选项">
        <ul>
          <li v-for="item in questionStore.currentQue.options" class="mb-10px">
            <el-input v-model="item.label"></el-input>
            <div class="action">
              <el-button type="primary" link>新增</el-button>
              <el-button type="danger" link>删除</el-button>
            </div>
          </li>
        </ul>
      </el-form-item>
    </el-form>
  </div>
</template>

<style scoped lang="less">
.attribute-container {
  height: 100vh;
  background-color: #fff;

  li {
    display: flex;
    align-items: center;

    .action {
      display: flex;
    }
  }
}
</style>